package com.itheima.pojo;

import lombok.*;

/**
 * @ClassName user
 * @Author 16799
 * @Date 2025/11/6 17:57
 * @Version 1.0
 * @Description TODO
 **/

//@Getter
//@Setter
//@ToString
//@EqualsAndHashCode

//上面四个可以改为一个注解
@Data
@NoArgsConstructor  //无参构造
@AllArgsConstructor  //全参构造
public class User {
    private Integer id;
    private String name;
    private Short age;
    private Short gender;
    private String phone;

    //有了lombok后，把下面的可以注释起来
  /*  public User() {
    }

    public User(Integer id, String name, Short age, Short gender, String phone) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.phone = phone;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Short getAge() {
        return age;
    }

    public void setAge(Short age) {
        this.age = age;
    }

    public Short getGender() {
        return gender;
    }

    public void setGender(Short gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                ", phone='" + phone + '\'' +
                '}';
    }*/
}
